#include <bits/stdc++.h>

using namespace std;

// #define LOCK_GETCHAR
// #define USE_INT_128

#if __cplusplus < 201400
#warning "Please use c++14 or higher."
#define CONSTEXPR_FUNC
#define ENABLE_IF_INT
#else
#define CONSTEXPR_FUNC constexpr
#define ENABLE_IF_INT , enable_if_t<_is_integer<T>, int> = 0
template <class T> constexpr bool _is_integer = numeric_limits<T>::is_integer;
template <> constexpr bool _is_integer<bool> = false;
template <> constexpr bool _is_integer<char> = false;
#ifdef USE_INT_128
template <> constexpr bool _is_integer<__int128> = true;
template <> constexpr bool _is_integer<__uint128_t> = true;
#endif
#endif

#if !defined(_WIN32) && !defined(LOCK_GETCHAR)
#define getchar getchar_unlocked
#endif

#define il inline
#define mkp make_pair
#define fi first
#define se second
#define For(i, j, k) for (decltype(j - k) i = (j); i <= (k); ++i)     // NOLINT
#define ForDown(i, j, k) for (decltype(j - k) i = (j); i >= (k); --i) // NOLINT
#define eb emplace_back
#ifndef ONLINE_JUDGE
#define FileIO(filename)                                                       \
  freopen(filename ".in", "r", stdin);                                         \
  freopen(filename ".out", "w", stdout)
#else
#define FileIO(filename) void(0)
#endif

using ll = long long;
using uint = unsigned int;
using ull = unsigned long long;
using db = double;
using ldb = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#ifdef USE_INT_128
using lll = __int128_t;
using ulll = __uint128_t;
#endif

// clang-format off
CONSTEXPR_FUNC il ll qpow(ll x, ull y, ll mod){ ll ans = 1; x %= mod; while (y) { if (y & 1) (ans *= x) %= mod; (x *= x) %= mod; y >>= 1; } return ans; }
template<typename T> CONSTEXPR_FUNC il void cmin(T & x, const T &y){ x = min(x, y); }
template<typename T> CONSTEXPR_FUNC il void cmax(T & x, const T &y){ x = max(x, y); }
template<typename T ENABLE_IF_INT> il void read(T &x){ x = 0; int f = 1; int c = getchar(); while (!isdigit(c)) { if (c == '-') f = -1; c = getchar(); } while (isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); } x *= f; }
il void read(string &s) { s = ""; char ch = getchar(); while (isspace(ch)) ch = getchar(); while (!isspace(ch)) s += ch, ch = getchar(); }
il void read(char *s) { int ch = getchar(), p = 0; while (isspace(ch)) ch = getchar(); while (!isspace(ch)) s[p++] = ch, ch = getchar(); }
template<typename T, typename ... Args> il void read(T &x, Args &... y){ read(x), read(y...); }
// clang-format on

// File head end

namespace {
constexpr ll mod = 1e9 + 7;
int n, m, x, y;
ll f[2][1 << 5][1 << 5];

struct Mat {
  int r, c, v[4][4];
  Mat(int _r = 0, int _c = 0) : r(_r), c(_c) { memset(v, 0, sizeof(v)); }
  Mat operator*(const Mat &rhs) const {
    assert(c == rhs.r);
    Mat res(r, rhs.c);
    For(i, 0, r - 1) For(k, 0, c - 1) For(j, 0, rhs.c - 1) {
      (res.v[i][j] += 1ll * v[i][k] * rhs.v[k][j] % mod) %= mod;
    }
    return res;
  }
  Mat pow(ull y) const {
    assert(r == c);
    Mat res(r, r), x = *this;
    For(i, 0, r - 1) res.v[i][i] = 1;
    while (y) {
      if (y & 1)
        res = res * x;
      x = x * x, y >>= 1;
    }
    return res;
  }
};
il void Sol1() {
  Mat F(1, 4), G(1, 4), trans(4, 4);
  F.v[0][0] = 1;
  For(i, 0, 1) For(j, 0, 1) For(k, 0, 1)
      trans.v[i << 1 | j][(i ^ (j & k)) << 1 | k]++;

  F = F * trans.pow(x - 1);
  For(i, 0, 1) For(j, 0, 1) {
    (G.v[0][(i ^ (j & y)) << 1 | y] += F.v[0][i << 1 | j]) %= mod;
  }
  G = G * trans.pow(n - x);
  ll ans = (G.v[0][2] + G.v[0][3]) % mod;
  cout << ans << '\n';
}

il void Main() {
  FileIO("pearl");
  read(n, m, x), y = 0;
  {
    string p;
    cin >> p;
    For(i, 0, m - 1) y += ((p[i] - '0') << i);
  }
  if (m == 1)
    return Sol1();
  f[0][0][0] = 1;
  int msk = (1 << m) - 1;
  For(i, 1, n) {
    int cur = i & 1, pre = cur ^ 1;
    memset(f[cur], 0, sizeof(f[cur]));
    For(j, 0, msk) For(k, 0, msk) {
      if (i != x)
        For(o, 0, msk)(f[cur][(j ^ (k * o)) & msk][o] += f[pre][j][k]) %= mod;
      else
        (f[cur][(j ^ (k * y)) & msk][y] += f[pre][j][k]) %= mod;
    }
  }
  ll ans = 0;
  For(i, 1, msk) For(j, 0, msk) { (ans += 1ll * i * f[n & 1][i][j]) %= mod; }
  cout << ans << '\n';
}
} // namespace

signed main() { return Main(), 0; }
